<template>
  <template v-if="!testRecords.length">
    <van-empty description="暂无测试记录" />
  </template>
  <template v-else>
    <section class="w-screen h-screen bg-white box-border">
      <template v-for="record in testRecords" :key="record._id">
        <div class="flex justify-between items-center text-base h-12 box-border px-5 border-b border-slate-300">
          <span>测试日期: {{ record.date }}</span>
          <span>{{ record.title }}</span>
        </div>
      </template>
    </section>
  </template>
</template>

<script setup>
import { ref } from 'vue'
import { Evaluation } from '@/api/Evaluation'
const EvaluationRequest = new Evaluation()

const testRecords = ref([])

EvaluationRequest.getEvaluations().then((result) => {
  testRecords.value.push(...result.data)
})
</script>

<style scoped></style>
